package com.bioscript.standalone.IO;

import java.io.File;
import java.util.Scanner;

abstract class ReaderClass<E> {

	E obj = null;
	
	public abstract void read(String readLine);
	
	public void setup(String fileName) throws Exception
	{
		Scanner scanner = new Scanner(new File (fileName));
		while(scanner.hasNext())
		{
			String readLine = scanner.nextLine();
			read(readLine);
		}
		scanner.close();
	}
	
	public void onClose(Object obj)
	{}
	
	public void setValue(E value)
	{
		obj = value;
	}
	
	public E getValue()
	{
		return obj;
	}
}
